package com.example.springAop.com.demo.jdkDynamicProxy;

import java.lang.reflect.Proxy;

public class myTest {

    public static void main(String[] args) {
        //创建目标对象
        AccountServiceImpl target = new AccountServiceImpl();
        //创建代理对象
        IAccountService proxy = (IAccountService) Proxy.newProxyInstance(target.getClass().getClassLoader(),
                target.getClass().getInterfaces(),
                new AccountAdvice(target));

        proxy.transfer();

    }

}
